package com.hoshiicloud.payment.service;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.payment.config.WeixinConfig;
import com.hoshiicloud.payment.param.PayRequest;
import com.hoshiicloud.payment.param.RefundRequest;

public interface WeixinPayService {

    /**
     * @param payRequest
     * @param weixinConfig
     * @return com.hoshiicloud.common.rpc.Response
     * @author: Mr.wu
     * @descripton: 微信支付统一下单接口, 接入商户需提前上传证书至服务器，否则支付失败
     * @date: 17:25 2019/5/16
     */
    Response order(PayRequest payRequest, WeixinConfig weixinConfig);

    /**
     * @param merOrderId
     * @param weixinConfig
     * @return com.hoshiicloud.common.rpc.Response
     * @author: Mr.wu
     * @descripton: 微信支付查询订单
     * @date: 19:34 2019/5/16
     */
    Response queryOrder(String merOrderId, WeixinConfig weixinConfig);

    Response queryRefundOrder(String merOrderId, WeixinConfig weixinConfig);

    /**
     * @param merOrderId
     * @param weixinConfig
     * @return com.hoshiicloud.common.rpc.Response
     * @author: Mr.wu
     * @descripton: 微信支付关闭订单
     * @date: 17:36 2019/5/17
     */
    Response closeOrder(String merOrderId, WeixinConfig weixinConfig);

    /**
     * @param param
     * @param weixinConfig
     * @return com.hoshiicloud.common.rpc.Response
     * @author: Mr.wu
     * @descripton: 微信支付退款
     * @date: 11:02 2019/5/18
     */
    Response refund(RefundRequest param, WeixinConfig weixinConfig);


}
